import React, { memo } from "react";
import { Provider } from "react-redux";
import { BrowserRouter } from "react-router-dom";
// import { renderRoutes } from "react-router-config";
import stroe from "./store/index";
import { AuthContext } from "lib/auth-context";
import routes, { renderRoutes } from "router";

const text = {
  info: "本地端",
};

function App() {
  return (
    <AuthContext.Provider value={text}>
      <Provider store={stroe}>
        <BrowserRouter>{renderRoutes(routes)}</BrowserRouter>
      </Provider>
    </AuthContext.Provider>
  );
}

export default memo(App);
